import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { BaseEntity } from 'src/entities/base.entity';
@Entity()
export class Role extends BaseEntity {
  @PrimaryGeneratedColumn()
  role_id: number;

  @Column({
    type: 'varchar',
    nullable: true,
    length: 30,
    comment: '角色名称',
  })
  role_name: string;

  @Column({
    type: 'varchar',
    nullable: true,
    length: 100,
    comment: '角色权限字符串',
  })
  role_key: string;

  @Column({
    type: 'int',
    nullable: true,
    default: 0,
    comment: '显示顺序',
  })
  role_sort: number;

  @Column({
    type: 'char',
    length: 1,
    nullable: true,
    default: '1',
    comment: '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限）',
  })
  role_scope: number;

  @Column({
    type: 'tinyint',
    default: '1',
    nullable: true,
    comment: '菜单树选择项是否关联显示',
  })
  menu_check_strictly: number;

  @Column({
    type: 'tinyint',
    default: '1',
    nullable: true,
    comment: '部门树选择项是否关联显示',
  })
  dept_check_strictly: number;

  @Column({
    type: 'char',
    length: 1,
    default: '0',
    nullable: true,
    comment: '角色状态（0：正常 1：停用）',
  })
  status: string;

  @Column({
    type: 'char',
    length: 1,
    default: '0',
    nullable: true,
    comment: '删除标志（0：代表存在 1：代表删除）',
  })
  del_flag: string;
}
